//
//  MCAddBankCardNameTableViewCell.m
//  TLYL
//
//  Created by MC on 2017/7/11.
//  Copyright © 2017年 TLYL01. All rights reserved.
//

#import "MCAddBankCardNameTableViewCell.h"

@interface MCAddBankCardNameTableViewCell ()


@property (nonatomic,strong)UILabel * lab_Name;
@property (nonatomic,strong)UITextField * textField_name;
@property (nonatomic,strong)UIView   * view_line;

@end

@implementation MCAddBankCardNameTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self){
        [self initView];
    }
    return self;
}

- (void)initView{
    
    self.backgroundColor=[UIColor whiteColor];
    
    _lab_Name =[[UILabel alloc]init];
    _lab_Name.text=@"姓名";
    _lab_Name.textColor=RGB(69, 142, 226);
    _lab_Name.font=[UIFont systemFontOfSize:20];
    [self  addSubview:_lab_Name];
    
    
    _textField_name =[[UITextField alloc]init];
    _textField_name.placeholder=@"请输入持卡人姓名";
    [self  addSubview:_textField_name];
    
    
    _view_line=[[UIView alloc]init];
    _view_line.backgroundColor=RGB(200, 200, 200);
    [self addSubview:_view_line];
    
    [self relayOutConstraints];
}



-(void)relayOutConstraints{
    
    [_lab_Name mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self);
        make.left.equalTo(self.mas_left).offset(10);
        make.bottom.equalTo(self);
        make.width.mas_equalTo(50);

    }];
    
   
    
    [_textField_name mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self);
        make.bottom.equalTo(self);
        make.left.equalTo(_lab_Name.mas_right).offset(0);
        make.right.equalTo(self.mas_right).offset(-10);
    }];
    
    
    
    [_view_line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(self);
        make.left.equalTo(self.mas_left).offset(0);
        make.right.equalTo(self.mas_right).offset(0);
        make.height.mas_equalTo(0.5);
    }];
    
}

-(void)setDataSource:(id)dataSource{
    
    _dataSource=dataSource;
    
    
}

+(CGFloat)computeHeight:(id)info{
    
    return 40;
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
